<?php

/**
 * Description of BaseModule
 *
 * @author David Dusek
 */
class ModuleModule extends CMS\AbstractModule {
    public function hookAdminMenu() {
        return array("title" => "adminMenuTitle", 
                     "link" => ":Module:Module:default",
                     "img" => "btn_module.png");
    }
    
    public function hookAdminSubmenu() {
        $submenu = array(
            0 => array(
                "title" => "list",
                "link" => ":Module:Module:default",
                "icon" => "ui-icon-clipboard",
                "right" => "list",
            )
        );
        return $submenu;
    } 
    
    public function hookUserGetAcl() {
        $acl = array(
            "Module" => array(
                "name" => "module_aclTitle",
                "operations" => array(
                    "list" => "module_aclList", 
                    "edit" => "module_aclEdit"
                ),
            )
        );
        
        return $acl;
    }
    
    /**
     * Vrati seznam modulu.
     * @return array 
     */
    public function hookModuleGetModules() {
        return $this->em->getRepository("\CMS\Module\Models\Module")->findAll();
    }
}
